using Spine.Unity;
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks.nGame
{
    [TaskCategory("CameraShake")]
    [TaskDescription("Moves the Camera to the specified way. Returns Success.")]
    public class CameraShake : Action
    {
        [Tooltip("The new position of the SkeletonAnimation")]
        public SharedFloat shaketime;

        // cache the rigidbody component

        public override void OnStart()
        {
        }

        public override TaskStatus OnUpdate()
        {
            cameraShake.Instance.Shake();

            return TaskStatus.Success;
        }

        public override void OnReset()
        {
        }
    }
}